package com.mallcloud.mall.app.service.impl;

import com.mallcloud.mall.app.mapper.AppProcedureMapper;
import com.mallcloud.mall.app.service.AppSignService;
import com.mallcloud.mall.common.core.exception.FailException;
import com.mallcloud.mall.mall.api.entity.dto.ProSignIn;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 签到服务
 **/
@Slf4j
@Service
@RequiredArgsConstructor
public class AppSignServiceImpl implements AppSignService {
	private final AppProcedureMapper procedureMapper;

	@Override
	public void signIn(ProSignIn dto) {
		procedureMapper.signIn(dto);
		if (!dto.isSuccess()) {
			log.error("失败");
			throw new FailException(dto.getMessage());
		}
	}
}
